package com.tuniu.agents.common.entity.cart;

/**
 * Cart Item
 */
public class CartItem <T> {


    /**
     * Session ID
     */
    protected String traceId;
    /**
     * Snapshot ID
     */
    protected long  snapshotId;
    /**
     * Resource type
     * 21-Flight; 130-Hotel; 8-Train ticket; 201-Hotel package
     */
    protected int resType;
    /**
     * Status
     * 0-Normal; 1-Expired; 5-Deleted, deleted data will not be returned
     */
    protected int status;
    /**
     * Departure city code
     */
    protected int departureCityCode;
   
    /**
     * Departure city name
     */
    protected String departureCityName;
    /**
     * Arrival city code
     */
    protected int arrivalCityCode;
    /**
     * Arrival city name
     */
    protected String arrivalCityName;
    /**
     * Departure date
     */
    protected String departDate;
    /**
     * Parameter type
     * 1-List; 2-Detail
     */
    protected int paramType;  
    /**
     * Parameters
     */
    protected T params;
    /**
     * User ID
     */
    protected long userId;
    /**
     * Added time
     */
    protected String addTime;

    public String getTraceId() {
        return traceId;
    }

    public void setTraceId(String traceId) {
        this.traceId = traceId;
    }

    public long getSnapshotId() {
        return snapshotId;
    }
    public void setSnapshotId(long snapshotId) {
        this.snapshotId = snapshotId;
    }
    public int getResType() {
        return resType;
    }
    public void setResType(int resType) {
        this.resType = resType;
    }
    public int getStatus() {
        return status;
    }
    public void setStatus(int status) {
        this.status = status;
    }
    public int getDepartureCityCode() {
        return departureCityCode;
    }
    public void setDepartureCityCode(int departureCityCode) {
        this.departureCityCode = departureCityCode;
    }
    public String getDepartureCityName() {
        return departureCityName;
    }
    public void setDepartureCityName(String departureCityName) {
        this.departureCityName = departureCityName;
    }
    public int getArrivalCityCode() {
        return arrivalCityCode;
    }
    public void setArrivalCityCode(int arrivalCityCode) {
        this.arrivalCityCode = arrivalCityCode;
    }
    public String getArrivalCityName() {
        return arrivalCityName;
    }
    public void setArrivalCityName(String arrivalCityName) {
        this.arrivalCityName = arrivalCityName;
    }
    public String getDepartDate() {
        return departDate;
    }
    public void setDepartDate(String departDate) {
        this.departDate = departDate;
    }
    public int getParamType() {
        return paramType;
    }
    public void setParamType(int paramType) {
        this.paramType = paramType;
    }
    public T getParams() {
        return params;
    }
    public void setParams(T params) {
        this.params = params;
    }
    public long getUserId() {
        return userId;
    }
    public void setUserId(long userId) {
        this.userId = userId;
    }
    public String getAddTime() {
        return addTime;
    }
    public void setAddTime(String addTime) {
        this.addTime = addTime;
    }
    @Override
    public String toString() {
        return params != null ? params.toString() : "";
    }


    public static class ItemUrl {
        private String appUrl;

        public String getAppUrl() {
            return appUrl;
        }

        public void setAppUrl(String appUrl) {
            this.appUrl = appUrl;
        }
        
    }

    
}
